Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


The manager templates

The Progress Dynamics manager has one basic characteristic that distinguishes it from other business logic procedures: it runs on both sides of the AppServer connection. In this way it shares one key characteristic of the SmartDataObject, which enables you to write code for it in the AppBuilder just as you do for SDOs or SDO logic procedures in a dynamic application. The template for new managers has the DB-AWARE flag set on to tell the AppBuilder to allow you to write code into this single procedure file and to designate whether that code should be compiled and executed for the client, for the server, or for both.

The DB-AWARE flag is, first of all, a preprocessor value in the template, as shown:

/* ********************  Preprocessor Definitions  ******************** */ 
&Scoped-define PROCEDURE-TYPE Procedure 
&Scoped-define DB-AWARE YES 

You can also set the DB-AWARE flag in special Procedure Settings comments that the AppBuilder parses when it reads in a file for editing. The preprocessor allows your code to reference the DB-AWARE flag, and this internal setting prevents the value from being changed, which would disable the manager, as shown:

/* *********************** Procedure Settings ************************ */ 
&ANALYZE-SUSPEND _PROCEDURE-SETTINGS 
/* Settings for THIS-PROCEDURE 
   Type: Procedure 
   Allow:  
   Frames: 0 
   Add Fields to: Neither 
   Other Settings: CODE-ONLY APPSERVER DB-AWARE NO-PROXY 
 */ 
&ANALYZE-RESUME _END-PROCEDURE-SETTINGS 

In addition to the DB-AWARE setting, there is a setting for the AppBuilder’s information called NO-PROXY. This setting tells the AppBuilder that, unlike for an SDO, the AppBuilder should not actually generate the client proxy when you save the manager procedure.

There are several reasons for this:

So, for all these reasons, the AppBuilder does not generate or manage the client procedure for you. You can create the client procedure yourself by copying the template for it and naming the server filename that it should include.

The two template procedures that you use to build new managers are ry/app/rytemsrvrp.p and ry/obj/rytemclntp.p. The first is opened for you when you create a new manager in the AppBuilder, and the second you copy and edit yourself.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095